package com.ruoyi.web.hbxx.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.web.hbxx.domain.ChannelBuoyInfo;
import com.ruoyi.web.hbxx.domain.ChannelBuoyInfoLog;
import com.ruoyi.web.hbxx.mapper.ChannelBuoyInfoLogMapper;
import com.ruoyi.web.hbxx.mapper.ChannelBuoyInfoMapper;
import com.ruoyi.web.hbxx.service.IChannelBuoyInfoLogService;
import com.ruoyi.web.hbxx.service.IChannelBuoyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 南方测绘航标数据Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-19
 */
@Service
public class ChannelBuoyInfoLogServiceImpl implements IChannelBuoyInfoLogService
{
    @Autowired
    private ChannelBuoyInfoLogMapper channelBuoyInfoLogMapper;

    /**
     * 查询南方测绘航标数据
     *
     * @param id 南方测绘航标数据主键
     * @return 南方测绘航标数据
     */
    @Override
    public ChannelBuoyInfoLog selectChannelBuoyInfoLogById(Long id)
    {
        return channelBuoyInfoLogMapper.selectChannelBuoyInfoLogById(id);
    }

    /**
     * 查询南方测绘航标数据列表
     *
     * @param channelBuoyInfoLog 南方测绘航标数据
     * @return 南方测绘航标数据
     */
    @Override
    public List<ChannelBuoyInfoLog> selectChannelBuoyInfoLogList(ChannelBuoyInfoLog channelBuoyInfoLog)
    {
        return channelBuoyInfoLogMapper.selectChannelBuoyInfoLogList(channelBuoyInfoLog);
    }

    /**
     * 新增南方测绘航标数据
     *
     * @param channelBuoyInfoLog 南方测绘航标数据
     * @return 结果
     */
    @Override
    public int insertChannelBuoyInfoLog(ChannelBuoyInfoLog channelBuoyInfoLog)
    {
        channelBuoyInfoLog.setCreateTime(DateUtils.getNowDate());
        return channelBuoyInfoLogMapper.insertChannelBuoyInfoLog(channelBuoyInfoLog);
    }

    /**
     * 修改南方测绘航标数据
     *
     * @param channelBuoyInfoLog 南方测绘航标数据
     * @return 结果
     */
    @Override
    public int updateChannelBuoyInfoLog(ChannelBuoyInfoLog channelBuoyInfoLog)
    {
        channelBuoyInfoLog.setUpdateTime(DateUtils.getNowDate());
        return channelBuoyInfoLogMapper.updateChannelBuoyInfoLog(channelBuoyInfoLog);
    }

    /**
     * 批量删除南方测绘航标数据
     *
     * @param ids 需要删除的南方测绘航标数据主键
     * @return 结果
     */
    @Override
    public int deleteChannelBuoyInfoLogByIds(Long[] ids)
    {
        return channelBuoyInfoLogMapper.deleteChannelBuoyInfoLogByIds(ids);
    }

    /**
     * 删除南方测绘航标数据信息
     *
     * @param id 南方测绘航标数据主键
     * @return 结果
     */
    @Override
    public int deleteChannelBuoyInfoLogById(Long id)
    {
        return channelBuoyInfoLogMapper.deleteChannelBuoyInfoLogById(id);
    }
}
